#include<iostream>
#include<string>
using namespace std;
int main()
{
	string num;
	double count_2=0,i=0,len;//count_2为2的个数
	double level;
	bool minus=false;//判断是否为负数
	bool even=false;//判断是否为偶数
	cin >> num;
	len = num.length();
	if (num[0] =='-')
	{
		minus = true;
		i++;
	}
	for (;i < len;i++)
		if (num[i] == '2')
			count_2++;
	i--;
	if ((int)num[i] % 2 == 0)
		even = true;
	if (minus == false)
	{
		if (even == true)
			level = count_2 / len * 2;
		else
			level = count_2 / len ;
	}
	else
	{
		if (even == true)
			level = count_2 / (len-1) * 2 * 1.5;
		else
			level = count_2 / (len-1)*1.5;
	}
	level = level * 100;
	printf("%0.2lf%%", level);
	return 0;
}
//模拟